package test;

import java.io.IOException;

import mapreduce.Job;
import mapreduce.JobConf;

public class wordcount {
	public static void main(String[] args) throws IOException, ClassNotFoundException
	{
		JobConf conf =new JobConf();
		
		conf.setInputDir("C:/mapreduce/input");
		conf.setMapperClass(wordmapper.class);
		conf.setMapInputKeyClass(String.class);
		conf.setMapInputValueClass(String.class);
		conf.setMapOutputKeyClass(String.class);
		conf.setReduceInputKeyClass(String.class);
		conf.setReduceInputValueClass(Integer.class);
		conf.setReduceOutputKeyClass(String.class);
		conf.setReduceOutputValueClass(Integer.class);
		conf.setReducerClass(wordreducer.class);
		conf.setNumofreduce(4);
		conf.setBuffersize(32000);
		conf.setOutputDir("c:/mapreduce/output");
		Job<String,String,String,Integer,String,Integer> job = new Job<String,String,String,Integer,String,Integer>(conf);
		job.setsortflag(true);
		job.setMemoryflag(false);
		
		job.run();
				
		
	}

}
